package com.thrd.taiexhibition.presener;

import com.thrd.taiexhibition.bean.DayEnterprationInfo;
import com.thrd.taiexhibition.callback.MvpCallback;
import com.thrd.taiexhibition.model.EnterpriseInfoModel;
import com.thrd.taiexhibition.view.EnterpriseInfoView;

import java.util.List;

/**
 * @author: ${唐杰}
 * @date: 2021/4/1
 */
public class EnterpriseInfoPresener {
    private EnterpriseInfoView mEnterpriseInfoView;
    private EnterpriseInfoModel mEnterpriseInfoModel;
    public EnterpriseInfoPresener(EnterpriseInfoView mEnterpriseInfoView){
        this.mEnterpriseInfoView=mEnterpriseInfoView;
        this.mEnterpriseInfoModel=new EnterpriseInfoModel();
    }


    public void getEnterpriseInfo(long id){
        this.mEnterpriseInfoModel.getEnterpriseInfo("1", new MvpCallback<List<DayEnterprationInfo>>() {
            @Override
            public void onSuccess(List<DayEnterprationInfo> beanEnterprationInfo) {
                mEnterpriseInfoView.onSuccess(beanEnterprationInfo);
            }

            @Override
            public void onFailed(String e, int code) {
                mEnterpriseInfoView.onError(e,code);
            }
        });
    }



}
